package com.zhijian.warehouse.manage.entity.vo.response;

import com.zhijian.warehouse.manage.enums.StatusEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * 仓库 回显vo
 *
 * @author auto
 * @version 1.0
 * @date 2024-10-10 19:10:55
 */
@Getter
@Api(tags = "仓库回显vo")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WarehouseVo implements Serializable {

    private static final long serialVersionUID = -1;

    /**
     * 主键ID
     */
    @ApiModelProperty("主键ID")
    private Long id;

    /**
     * 编号
     */
    @ApiModelProperty("编号")
    private String number;

    /**
     * 名称
     */
    @ApiModelProperty("名称")
    private String name;

    /**
     * 地址
     */
    @ApiModelProperty("地址")
    private String address;

    /**
     * 面积
     */
    @ApiModelProperty("面积")
    private String squareMeasure;

    /**
     * 负责人
     */
    @ApiModelProperty("负责人")
    private String header;

    /**
     * 联系电话
     */
    @ApiModelProperty("联系电话")
    private String headerPhone;

    /**
     * 状态，1：启用，0：禁用
     */
    @ApiModelProperty("状态，1：启用，0：禁用")
    private Byte status;

    /**
     * 状态字符串
     */
    @ApiModelProperty("状态字符串")
    private String statusStr;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    private String note;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private String createTime;

    /**
     * 创建人ID
     */
    @ApiModelProperty("创建人ID")
    private Long createUserId;

    /**
     * 创建人姓名
     */
    @ApiModelProperty("创建人姓名")
    private String createUserName;

    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private String updateTime;

    /**
     * 修改人ID
     */
    @ApiModelProperty("修改人ID")
    private Long updateUserId;

    /**
     * 修改人姓名
     */
    @ApiModelProperty("修改人姓名")
    private String updateUserName;


    /**
     * 备注
     */
    @ApiModelProperty("是否删除 0 = 未删除 1 = 已删除")
    private Integer isDelete;

    public void setId(Long id) {
        this.id = id;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setSquareMeasure(String squareMeasure) {
        this.squareMeasure = squareMeasure;
    }

    public void setHeader(String header) {
        this.header = header;
    }

    public void setHeaderPhone(String headerPhone) {
        this.headerPhone = headerPhone;
    }

    public void setStatus(Byte status) {
        this.status = status;
        if (Objects.isNull(status)) {
            this.statusStr = null;
            return;
        }
        StatusEnum lineEnum = StatusEnum.getByCode(status.intValue());
        this.statusStr = Objects.nonNull(lineEnum) ? lineEnum.getDesc() : null;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
}